/*
 * @Descripttion : 
 * @version      : 
 * @Author       : zero
 * @Date         : 2021-06-08 10:43:43
 * @LastEditors  : zero
 * @LastEditTime : 2021-06-08 12:58:02
 */
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import api from './assets/js/api'
import http from './assets/js/https/axjos'
import '@/assets/css/common.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import BigNumber from 'bignumber.js'
Vue.prototype.api = api
Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.use(http)
Vue.prototype.message = function (text, type) { //消息提示
  let typeS
  switch (type) {
    case 1:
      typeS = 'success';
      break;
    case 2:
      typeS = 'warning';
      break;
    case 3:
      typeS = 'error';
      break;
  }
  this.$message({
    message: text,
    type: typeS
  });
}
var loading
Vue.prototype.loading = function (text) {  //loading开启
  console.log(this)
  loading = this.$loading({
    lock: true,
    text: text,
    spinner: 'el-icon-loading',
    background: 'rgba(0, 0, 0, 0.7)'
  });
}

Vue.prototype.loadingOver = function () {  //loading关闭
  loading.close()
}
Vue.prototype.$formatNum=function(num){
  return parseInt(new BigNumber(num).toFixed(0))
}
 new Vue({
  router,
  store,
  render: h => h(App),

}).$mount('#app')

// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.